Skip to content

Instantly share code, notes, and snippets.

@unxed
unxed / gist:d979fe069039fe075c18eb0218b1f8f5
Last active February 5, 2026 22:50
Windows-compatible kitty keyboard protocol implementation; Public Domain
if (_kitty_kb_flags) {
// References:
// https://sw.kovidgoyal.net/kitty/keyboard-protocol/
// https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes
char buffer[64] = {0};
const bool ctrl = (KeyEvent.dwControlKeyState & (LEFT_CTRL_PRESSED|RIGHT_CTRL_PRESSED)) != 0;
const bool alt = (KeyEvent.dwControlKeyState & (RIGHT_ALT_PRESSED|LEFT_ALT_PRESSED)) != 0;
@aleksasiriski
aleksasiriski / belabox-modified.md
Last active February 5, 2026 22:50
Setup Belabox modified with Wireguard remote access and BiB-Comms audio output working via Pipewire, Pulse and ALSA

Setup Belabox modified with Wireguard remote access and BiB-Comms audio output working via Pipewire, Pulse and ALSA

DO NOT RUN ON BELABOX: Flash belabox image to SD card (/dev/sdX):

sudo dd if=Downloads/belabox_rock_5b_plus-20250915-a84acea.img of=/dev/sdX bs=4M status=progress oflag=sync

Update the system:

sudo apt update -y && sudo apt upgrade -y
@steipete
steipete / agent.md
Created October 14, 2025 14:41
Agent rules for git
  • Delete unused or obsolete files when your changes make them irrelevant (refactors, feature removals, etc.), and revert files only when the change is yours or explicitly requested. If a git operation leaves you unsure about other agents' in-flight work, stop and coordinate instead of deleting.
  • Before attempting to delete a file to resolve a local type/lint failure, stop and ask the user. Other agents are often editing adjacent files; deleting their work to silence an error is never acceptable without explicit approval.
  • NEVER edit .env or any environment variable files—only the user may change them.
  • Coordinate with other agents before removing their in-progress edits—don't revert or delete work you didn't author unless everyone agrees.
  • Moving/renaming and restoring files is allowed.
  • ABSOLUTELY NEVER run destructive git operations (e.g., git reset --hard, rm, git checkout/git restore to an older commit) unless the user gives an explicit, written instruction in this conversation. Treat t
@swamikevala
swamikevala / rhel9-sssd-samba-ad.md
Last active February 5, 2026 22:49
Configure RHEL9.5 with sssd, samba and AD (by OpenAI Deep Research)

RHEL 9.5 AD Integration with SSSD and Samba (Step-by-Step Guide)

Important Note: (18-Feb-2025) This gist has some issues. Please see the addendum. Thanks @hortimech for pointing this out

A step-by-step configuration guide for setting up RHEL 9.5 with SSSD and Samba for Active Directory integration. Covers all required configuration files, settings, and explanations for each option. Also sources for further documentation and troubleshooting recommendations:

  • Domain Joining with SSSD (configuring sssd.conf, realmd, Kerberos, and automatic authentication for SSH and Samba)
  • Samba Configuration with SSSD (using sss as the backend for identity mapping, Kerberos authentication, and ensuring smooth Windows/Mac access)
  • Kerberos-based Single Sign-On (SSO) (ensuring users can access SMB shares without re-entering credentials)
  • Offline Authentication (caching credentials for when AD is unreachable)
@astiob
astiob / crossfades.py
Last active February 5, 2026 22:47
VapourSynth script for converting interlaced fades over telecined content to pure-progressive fades
import vapoursynth as vs
from vsdeinterlace import vinverse
__all__ = (
'smooth_stable_fade',
'unfade_unique_into_repeating',
'unfade_repeating_into_unique',
'fade_unique_into_repeating',
'fade_repeating_into_unique',
@ashwch
ashwch / git-worktrees-zero-to-hero.md
Last active February 5, 2026 22:42
Git Worktrees: From Zero to Hero - A comprehensive guide to using Git worktrees with submodules
@ajeetkumarrauniyar
ajeetkumarrauniyar / Array CheatSheet.md
Last active February 5, 2026 22:40
Cheat sheet of Array methods in JavaScript

Array Methods Cheat Sheet

1. push()

  • Definition: Adds one or more elements to the end of an array and returns the new length of the array.
  • Syntax: array.push(element1[, ...[, elementN]])
  • Example:
    let arr = [1, 2, 3];
    arr.push(4, 5);

console.log(arr); // Output: [1, 2, 3, 4, 5]

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active February 5, 2026 22:36
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This does not works in browser for quests which require you to play a game! Use the desktop app to complete those.

How to use this script:

  1. Accept a quest under Discover -> Quests
  2. Press Ctrl+Shift+I to open DevTools
  3. Go to the Console tab
  4. Paste the following code and hit enter:
@kristopolous
kristopolous / free-ollama.sh
Last active February 5, 2026 22:31
Grabs a list of port scanned open ollama servers from the IPv4 space, filters it by model, sorts by TPS and emits an IP based on an index.
#!/bin/bash
# Example usage:
# free-ollama gemma3:latest {0..10}
#
# Try instrumenting it with llcat. pipx install llcat
# And then maybe xpanes
#
# Don't know what to choose?
# Run it without arguments, you'll get a frequency distribution.
#